<script id="tpl-file-item" type="text/template">
    {{ each list }}

    {{ if datatype=='image' }}
    <div class="file-item">
        <a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ else if datatype=='imageaudio' }}
    <div class="file-item">
        <a href="javascript:void(0);" title="点击添加音频" class="bindaudio">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
        <div class='audios' style='font-size: 1.3rem;'></div>
    </div>
    {{ else if datatype=='audioimage' }}
    <div class="file-item">
        <a href="javascript:void(0);" title="点击添加音频" class="bindaudio">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
        <input type="text" name="{{ name }}" value="">
    </div>

    {{ else if datatype=='video'}}
    <div class="file-item">
        <video src="{{ $value.file_path }}" width="120" height="120"></video>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ else if datatype=='audio'}}
    <div class="file-item">
        <div style="background-image: url('../assets/admin/img/audio.jpeg');background-repeat:no-repeat;background-size:100% 100%;width: 120px;height: 120px;">
        </div>
        <input type="hidden" class="audioid" name="{{ name }}" value="{{ $value.file_id }}">
        <input type="hidden" class="audiopath" name="{{ name }}" value="{{ $value.file_path }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ else }}
    <div class="file-item">
        <div style="background-image: url('../assets/admin/img/audio.jpeg');background-repeat:no-repeat;background-size:100% 100%;width: 120px;height: 120px;">
        </div>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ /if }}




    {{ /each }}
</script>


